#include <vcl.h>
#pragma hdrstop


#include <System.hpp>


int x = 0, y = 0, i = 0, k = 0;
bool a[ 100000/*# range 1..100000*/ ];


bool __fastcall test( int i )
{
  bool result = false;
  result = false;
  while ( i != 0 )
  {
    result = result ^ ((bool) ( i % 2 ) );
    i = i / 2;
  }
  return result;
}

int main(int argc, char* argv[])
{
  ReadLn( k );
  for ( int stop = k, i = 1; i <= stop; i++)
  {
    Read( x ); ReadLn( y );
    a[i - 1] = test( x ^ y );
  }
  for ( int stop = k, i = 1; i <= stop; i++)
  {
    if ( a[i - 1] )
      WriteLn( "seven" );
    else
      WriteLn( "four" );
  }
  return 0;
}
